@inherits Blazorise.Offcanvas
@using System.Text;
<CascadingValue Value="@this" IsFixed>
    <CascadingValue Value="@State">
        <div @ref="@ElementRef" id="@ElementId" class="@ClassNames" style="@StyleNames" tabindex="-1" role="dialog" aria-modal="@AriaModalString" aria-hidden="@AriaHiddenString" @attributes="@Attributes">
            @ChildContent
        </div>
        @if ( ShowBackdrop && BackdropVisible )
        {
            <_OffcanvasBackdrop />
        }
    </CascadingValue>
</CascadingValue>
@code {
    string AriaModalString => IsVisible ? "true" : null;

    string AriaHiddenString => IsVisible ? null : "true";
}
